﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ent.Inscripcion.Core.Core;

namespace Ent.Inscripcion.Presentacion
{
    public partial class Reporte : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var variable =  Request.QueryString.Get("Var");
            var criteria = DatoEstadisticaCriterio.NewDatoEstadisticaCriterio();
            criteria.Variable = variable;
            var datos = DatosEstadisticaLista.GetDatosEstadisticaLista(criteria);
            Chart1.DataSource = datos;
            Chart1.Titles[0].Text = string.Format("{0} por {1}",Chart1.Titles[0].Text,variable);
            Chart1.Series["Series 1"].XValueMember = "Valor";
            Chart1.Series["Series 1"].YValueMembers = "Cantidad";
            Chart1.DataBind();
        }
    }
}